package org.middlewaregr.bp;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.middlewaregr.services.ThesesServiceCaller;

public class CreateProposalTask {

	public int createProposal(String title, String consultant,
			String teacher_id, String proposal_description,
			String technologies, Integer execution_time) {
		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
		try {
			return ThesesServiceCaller.createThesesProposal(title, dateFormat
					.format(new Date()), consultant, teacher_id, "",
					proposal_description, technologies, execution_time);
		} catch (Exception e) {
			e.printStackTrace();
			return -1;
		}
	}
}
